package cn.jinjie.day04.test02;

public class Test04 {
    public static void main(String[] args) {
        useIMath(new IMath() {
            @Override
            public int calc(int a, int b, int c) {
                return a + b + c;
            }
        }, 100, 20, 30);
        useIMath((a, b, c) -> a - b - c, 100, 20, 30);
    }

    public static void useIMath(IMath math, int x, int y, int z) {
        int c = math.calc(x, y, z);
        System.out.println(c);
    }
}
